package com.aabte.springcloudlearn.feigncustomerdemo.controller;

import com.aabte.springcloudlearn.feigncustomerdemo.service.RetryCustomerFeignService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Daniel
 */
@Slf4j
@RestController
public class RetryCustomerController {

    @Autowired
    private RetryCustomerFeignService retryCustomerFeignService;

    @GetMapping("/retry")
    public String retry(){
        log.info("Start retry.");
        String result = retryCustomerFeignService.feignRetry();
        log.info("End retry.");
        return result;
    }

}
